const context = require('../globalContext');

/* ==== Router Regist  ============ */

const SwitchRouter = router => {
    router.patch('/action/switch/:tf', async (ctx, next) => {
        console.log('Router : PATCH switch :# ', ctx.params.tf);
        context.TriggerSwitch = !!tf;
        ctx.status = 201;
        ctx.body = 'OK';
        next();
    });
}
module.exports.SwitchRouter = SwitchRouter;